package com.zutassociation.system.service.impl;

import com.zutassociation.system.domain.Message;
import com.zutassociation.system.mapper.MessageMapper;
import com.zutassociation.system.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 消息 服务层实现
 *
 * @author 黄玉东
 * @version 1.0
 * @date 2021/2/25 17:51
 */
@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;


    @Override
    public Message selectMessageById(Long messageId) {
        return messageMapper.selectMessageById(messageId);
    }

    @Override
    public Message selectMessageByFromId(Long fromId) {
        return messageMapper.selectMessageByFromId(fromId);
    }

    @Override
    public Message selectMessageByToId(Long toId) {
        return messageMapper.selectMessageByToId(toId);
    }

    @Override
    public List<Message> selectMessageList(Message message) {
        return messageMapper.selectMessageList(message);
    }
    @Override
    public List<Message> selectMessageListBD(Message message) {
        return messageMapper.selectMessageListBD(message);
    }

    @Override
    public int insertMessage(Message message) {
        return messageMapper.insertMessage(message);
    }

    @Override
    public int updateMessage(Message message) {
        return messageMapper.updateMessage(message);
    }

    @Override
    public int updateMessageRead(Message message) {
        return messageMapper.updateMessageRead(message);
    }
    @Override
    public int updateMessageStatus(Message message) {
        return messageMapper.updateMessageStatus(message);
    }

    @Override
    public int deleteMessageById(Long messageId) {
        return messageMapper.deleteMessageById(messageId);
    }

    @Override
    public int deleteMessageByIds(Long[] messageIds) {
        return messageMapper.deleteMessageByIds(messageIds);
    }

    @Override
    public int deleteMessageByReadStatusIds0(Long[] messageIds) {
        return messageMapper.deleteMessageByReadStatusIds0(messageIds);
    }
    @Override
    public int deleteMessageByReadStatusIds1(Long[] messageIds) {
        return messageMapper.deleteMessageByReadStatusIds1(messageIds);
    }
}
